// Path: app/src/main/java/com/github/cythara/Note.java
// public interface Note {
// 
//     NoteName getName();
// 
//     int getOctave();
// 
//     String getSign();
// }
// 
// Path: app/src/main/java/com/github/cythara/NoteName.java
// public enum NoteName {
// 
//     C("C", "Do"),
//     D("D", "Re"),
//     E("E", "Mi"),
//     F("F", "Fa"),
//     G("G", "Sol"),
//     A("A", "La"),
//     B("B", "Si");
// 
//     private final String scientific;
//     private final String sol;
// 
//     NoteName(String scientific, String sol) {
//         this.scientific = scientific;
//         this.sol = sol;
//     }
// 
//     public String getScientific() {
//         return scientific;
//     }
// 
//     public String getSol() {
//         return sol;
//     }
// 
//     public static NoteName fromScientificName(String scientificName) {
//         for (NoteName noteName : NoteName.values()) {
//             if (noteName.getScientific().equalsIgnoreCase(scientificName)) {
//                 return noteName;
//             }
//         }
// 
//         throw new IllegalArgumentException("Could not convert from name: " + scientificName);
//     }
// }


import com.github.cythara.Note;
import com.github.cythara.NoteName;
import org.junit.Assert;
import org.junit.Test;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
package com.github.cythara.tuning;




public class NoteFrequencyCalculatorTest {

    @Test
    public void TestCalc() {

        InputStream resourceAsStream = getClass().getResourceAsStream("note_frequencies.csv");
        try (BufferedReader reader =
                     new BufferedReader(new InputStreamReader(resourceAsStream))) {
            while (reader.ready()) {
                String line = reader.readLine();
                String[] components = line.split(",");
                String noteWithOctave = components[0].split("/")[0];
                String frequency = components[1];

                String noteName = noteWithOctave.substring(0, 1);
                String octave = noteWithOctave.substring(1);
                String sign = "";
                if (noteWithOctave.contains("#")) {
                    noteName = noteWithOctave.substring(0, 1);
                    octave = noteWithOctave.substring(2);
                    sign = "#";
                }

                String finalNoteName = noteName;
                String finalOctave = octave;
                String finalSign = sign;
                Note note = new Note() {
                    @Override
// Path: app/src/main/java/com/github/cythara/Note.java
// public interface Note {
// 
//     NoteName getName();
// 
//     int getOctave();
// 
//     String getSign();
// }
// 
// Path: app/src/main/java/com/github/cythara/NoteName.java
// public enum NoteName {
// 
//     C("C", "Do"),
//     D("D", "Re"),
//     E("E", "Mi"),
//     F("F", "Fa"),
//     G("G", "Sol"),
//     A("A", "La"),
//     B("B", "Si");
// 
//     private final String scientific;
//     private final String sol;
// 
//     NoteName(String scientific, String sol) {
//         this.scientific = scientific;
//         this.sol = sol;
//     }
// 
//     public String getScientific() {
//         return scientific;
//     }
// 
//     public String getSol() {
//         return sol;
//     }
// 
//     public static NoteName fromScientificName(String scientificName) {
//         for (NoteName noteName : NoteName.values()) {
//             if (noteName.getScientific().equalsIgnoreCase(scientificName)) {
//                 return noteName;
//             }
//         }
// 
//         throw new IllegalArgumentException("Could not convert from name: " + scientificName);
//     }
// }


// Path: app/src/test/java/com/github/cythara/tuning/NoteFrequencyCalculatorTest.java
import com.github.cythara.Note;
import com.github.cythara.NoteName;
import org.junit.Assert;
import org.junit.Test;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

package com.github.cythara.tuning;




public class NoteFrequencyCalculatorTest {

    @Test
    public void TestCalc() {

        InputStream resourceAsStream = getClass().getResourceAsStream("note_frequencies.csv");
        try (BufferedReader reader =
                     new BufferedReader(new InputStreamReader(resourceAsStream))) {
            while (reader.ready()) {
                String line = reader.readLine();
                String[] components = line.split(",");
                String noteWithOctave = components[0].split("/")[0];
                String frequency = components[1];

                String noteName = noteWithOctave.substring(0, 1);
                String octave = noteWithOctave.substring(1);
                String sign = "";
                if (noteWithOctave.contains("#")) {
                    noteName = noteWithOctave.substring(0, 1);
                    octave = noteWithOctave.substring(2);
                    sign = "#";
                }

                String finalNoteName = noteName;
                String finalOctave = octave;
                String finalSign = sign;
                Note note = new Note() {
                    @Override
                    public NoteName getName() {